package com.demo.user.remote;

import com.demo.common.base.constant.SysServiceConstant;
import com.demo.common.base.pojo.JsonRes;
import com.demo.common.feign.config.FeignHeaderConfiguration;
import com.demo.user.bo.CreateUserBO;
import com.demo.user.bo.UserMainPageBO;
import com.demo.user.vo.UserMainVO;
import com.mybatisflex.core.paginate.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户feign接口
 *
 * @author DayDayUp
 * create on 2023-05-18
 **/
@FeignClient(contextId = "remoteUserMainService", value = SysServiceConstant.DEMO_USER_API,configuration = FeignHeaderConfiguration.class)
public interface RemoteUserMainService {
    @GetMapping("/userMain/pageUserMain")
    JsonRes<Page<UserMainVO>> pageUserMain(@SpringQueryMap UserMainPageBO userMainPageBO);

    @PostMapping("/userMain/createUser")
    JsonRes<Void> createUser(@RequestBody CreateUserBO createUserBO);


    @PostMapping("/userMain/createUser1")
    JsonRes<Void> createUser1(@RequestBody CreateUserBO createUserBO);
}
